Gestalt Test

The Gestalt Test window is used to add or edit a gestalt test for any script item. A Gestalt Test is a check for a particular system feature using the Gestalt call within the MacOS. This Gestalt Test window is opened by clicking the New or Edit buttons inside the Gestalt view within an item's info window. See the attributes section of this guide for more details.
The Gestalt Test window contains the following items:
- Gestalt Option
- This popup menu allows you to select either a predefined Gestalt Test or to create a custom one. If one of the predefined tests is chosen (i.e. "Power Manager Present"), then the remaining fields in the window are filled and set inactive so that they cannot be changed. If "Custom" is selected, then you can define your own Gestalt Test in the window's entry fields.
- Selector
- This entry field represents the four letter Gestalt selector code defined by Apple or by other software companies. For the predefined tests, the selector field is automatically filled in. For custom tests, you must enter the four letter code for the test you want to perform.
The best reference for Gestalt selectors is a document named "Gestalt Selectors List" maintained by Rene G.A. Ros. It is available on the Apple Developer CDs and from various Internet sites, including this one:
http://www.info.apple.com/cgi-bin/lister-pl?Apple.Support.Area/Developer_Services/Tool_Chest/OS_Utilities
- Operator
- This popup presents a list of comparison operators available for the Gestalt Test. The predefined tests have preset operators. For a custom test, you will need to choose the operator appropriate to your needs. The choices for operator include:
- "exists"
- "does not exist"
- "is equal to"
- "is not equal to"
- "is greater than"
- "is greater than or equal to"
- "is less than"
- "is less than or equal to"
- "bit is set"
- "bit is clear"
- Value
- This entry field allows you to specify a comparison value for the Gestalt Test. This field is not needed for all operations (i.e. "exists"). It will only be visible for those operators that require a comparison value.
- Bit Number
- This entry field allows you to specify a bit number for the Gestalt Test. This field is only needed for the bit operators (i.e. "bit is set" and "bit is clear"). The bit number represents the number of the bit to test for a 1 (set) or 0 (clear). This option is needed because certain Gestalt selectors return their information as bit flags.
- Change
- This button closes the window, saving any changes. For a new Gestalt Test, this button is named Create.
- Cancel
- This button closes the window, canceling any changes.
- Delete
- This button deletes the current Gestalt Test from the script item. For a new Gestalt Test, this button is not available.
[Contents | Contact Information]
Last modified 26-MAR-96
Copyright © 1996 Ray Sauers Associates, Inc.